<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="机器学习," />










<meta name="description" content="绪论 多项式曲线拟合 贝叶斯定理 回归问题的损失函数  绪论  机器学习可以使计算机根据算法对不同数据进行不同的操作。机器学习使用分为回归、分类两个问题，分为无监督学习与监督学习两个类别。  回归：输出是多个连续变量，最为简单的回归就是我们在高中数学中学到的回归曲线，根据回归方程可以给出的输出值为一个变量。  分类：分类问题比回归难。比如一系列图像数据分为自拍，景色，人像等等之类的类别，属于离散">
<meta name="keywords" content="机器学习">
<meta property="og:type" content="article">
<meta property="og:title" content="PRML第一章学习笔记">
<meta property="og:url" content="http://yoursite.com/2018/07/10/学习笔记/index.html">
<meta property="og:site_name" content="moonhwi的小站">
<meta property="og:description" content="绪论 多项式曲线拟合 贝叶斯定理 回归问题的损失函数  绪论  机器学习可以使计算机根据算法对不同数据进行不同的操作。机器学习使用分为回归、分类两个问题，分为无监督学习与监督学习两个类别。  回归：输出是多个连续变量，最为简单的回归就是我们在高中数学中学到的回归曲线，根据回归方程可以给出的输出值为一个变量。  分类：分类问题比回归难。比如一系列图像数据分为自拍，景色，人像等等之类的类别，属于离散">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://yoursite.com/2018/07/10/学习笔记/1-1.jpg">
<meta property="og:updated_time" content="2018-07-16T06:12:11.459Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="PRML第一章学习笔记">
<meta name="twitter:description" content="绪论 多项式曲线拟合 贝叶斯定理 回归问题的损失函数  绪论  机器学习可以使计算机根据算法对不同数据进行不同的操作。机器学习使用分为回归、分类两个问题，分为无监督学习与监督学习两个类别。  回归：输出是多个连续变量，最为简单的回归就是我们在高中数学中学到的回归曲线，根据回归方程可以给出的输出值为一个变量。  分类：分类问题比回归难。比如一系列图像数据分为自拍，景色，人像等等之类的类别，属于离散">
<meta name="twitter:image" content="http://yoursite.com/2018/07/10/学习笔记/1-1.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"right","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2018/07/10/学习笔记/"/>





  <title>PRML第一章学习笔记 | moonhwi的小站</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-right page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">moonhwi的小站</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            时间轴
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/07/10/学习笔记/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="limenghui">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="moonhwi的小站">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">PRML第一章学习笔记</h1>
        

        <div class="post-meta">
          <span class="post-time">
          
  <span class="post-updated">
  &nbsp; | &nbsp; 更新于
  <time itemprop="dateUpdated" datetime="2018-07-16T14:12:11+08:00" content="2018-07-16">
    2018-07-16
  </time>
  </span>

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-07-10T00:00:00+08:00">
                2018-07-10
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/学习笔记/" itemprop="url" rel="index">
                    <span itemprop="name">学习笔记</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <ul>
<li><a href="#绪论">绪论</a></li>
<li><a href="#多项式曲线拟合">多项式曲线拟合</a></li>
<li><a href="#贝叶斯定理">贝叶斯定理</a></li>
<li><a href="#回归问题的损失函数">回归问题的损失函数</a></li>
</ul>
<h1 id="绪论"><a href="#绪论" class="headerlink" title="绪论"></a>绪论</h1><p>  机器学习可以使计算机根据算法对不同数据进行不同的操作。机器学习使用分为回归、分类两个问题，分为无监督学习与监督学习两个类别。<br>  回归：输出是多个连续变量，最为简单的回归就是我们在高中数学中学到的回归曲线，根据回归方程可以给出的输出值为一个变量。<br>  分类：分类问题比回归难。比如一系列图像数据分为自拍，景色，人像等等之类的类别，属于离散解。<br>  无监督学习：在计算机不知道数据的具体分类进行自主分类，而不是在给定的标签中做匹配。<br>  监督学习：人为提供离散的标签，计算机根据机器学习算法对其进行合适的分类。</p>
  <a id="more"></a>
<h2 id="多项式曲线拟合"><a href="#多项式曲线拟合" class="headerlink" title="多项式曲线拟合"></a>多项式曲线拟合</h2><p>简单的拟合方法：<br>$y(x;w) = w_0 + w_1x +\cdots =\sum\limits_{i=0}^{N} w_jx^j$<br>其中M是多项式的阶数$（order），x_j$表⽰$x$的$j$次幂。多项式系数$w_0$; $w_M$整体记作向量<strong>$w$</strong>。注意，虽然多项式函数$y(x,w)$是x的⼀个⾮线性函数，它是系数$w$的⼀个线性函数。类似多项式函数的这种关于未知参数满⾜线性关系的函数有着重要的性质，被叫做线性模型。</p>
<p>系数的值可以通过调整多项式函数拟合训练数据的⽅式确定，根据训练数据可以计算$w$，计算方法一般为最小化错误函数<br>$E(w)=\sum\limits_{i=1}^N{ y(x_n,w)-t_n}^2$<br>但是由于$M$的值不同，可以产生多个拟合函数，需要选择$M$防止出现$over-fitting$(过拟合)，这种情况出现在$M$过大时，此时函数会出现剧烈震荡，有时候也可以使用<br>$E_{RMS}=\sqrt{\frac{2E(w^*)}{N}}$</p>
<p><img src="/2018/07/10/学习笔记/1-1.jpg" alt="logo"><br>为了减小$w$的复杂度的同时减小$RMS$，可以引入一个惩罚项，修正后的误差函数如下：<br>$E^~(w)=\frac{1}{2}\sum\limits^N_{n=1}{y(x_n,w)-t_n }^2+\frac{\lambda}{2}||w||^2$</p>
<h2 id="贝叶斯定理"><a href="#贝叶斯定理" class="headerlink" title="贝叶斯定理"></a>贝叶斯定理</h2><p>$p(Y|X)=\frac{p(X|Y)p(Y)}{p(X)}$<br>其他关于概率论的知识不再回顾。<br>贝叶斯概率模型在机器学习中体现为<br>$p(w|D)=\frac{p(D|w)p(w)}{p(D)}$<br>如果使用自然语言则可以描述成<br>$posterior \varpropto prior \ast likelihood$<br>用来描述后验概率与先验概率之间的关系。最大化似然函数与最小化误差函数等价。</p>
<h2 id="回归问题的损失函数"><a href="#回归问题的损失函数" class="headerlink" title="回归问题的损失函数"></a>回归问题的损失函数</h2><p>$E(L)=\int\int{y(x)-t}^2p(x,t)dxdt$<br>最小化$E[L]$可以通过对$y(x)$进行控制，对y(x)求导为0之后可以得到<br>$y(x)=\frac{\int tp(x,t)}{p(x)}$<br>在此条件下可以推导出损失函数的另一种形式<br>$loss=bias+noise$<br>之后的信息论的内容省略。</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/机器学习/" rel="tag"># 机器学习</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/06/07/日记/" rel="next" title="日记(1)-答辩">
                <i class="fa fa-chevron-left"></i> 日记(1)-答辩
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/07/15/北邮信通考研经验/" rel="prev" title="北邮信通考研经验to王叶">
                北邮信通考研经验to王叶 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avatar.jpg"
                alt="limenghui" />
            
              <p class="site-author-name" itemprop="name">limenghui</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">4</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/moonhwi" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:limenghui773@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#绪论"><span class="nav-number">1.</span> <span class="nav-text">绪论</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#多项式曲线拟合"><span class="nav-number">1.1.</span> <span class="nav-text">多项式曲线拟合</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#贝叶斯定理"><span class="nav-number">1.2.</span> <span class="nav-text">贝叶斯定理</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#回归问题的损失函数"><span class="nav-number">1.3.</span> <span class="nav-text">回归问题的损失函数</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">limenghui</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>








        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

</body>
</html>
